package com.ruoyi.safety.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.safety.mapper.SensorTypeDictMapper;
import com.ruoyi.safety.domain.SensorTypeDict;
import com.ruoyi.safety.service.ISensorTypeDictService;

/**
 * 传感器类型编码Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-06
 */
@Service
public class SensorTypeDictServiceImpl extends ServiceImpl<SensorTypeDictMapper, SensorTypeDict> implements ISensorTypeDictService //修改
{
    @Autowired
    private SensorTypeDictMapper sensorTypeDictMapper;

    /**
     * 查询传感器类型编码
     * 
     * @param sensorCode 传感器类型编码主键
     * @return 传感器类型编码
     */
    @Override
    public SensorTypeDict selectSensorTypeDictBySensorCode(String sensorCode)
    {
        return sensorTypeDictMapper.selectSensorTypeDictBySensorCode(sensorCode);
    }

    /**
     * 查询传感器类型编码列表
     * 
     * @param sensorTypeDict 传感器类型编码
     * @return 传感器类型编码
     */
    @Override
    public List<SensorTypeDict> selectSensorTypeDictList(SensorTypeDict sensorTypeDict)
    {
        return sensorTypeDictMapper.selectSensorTypeDictList(sensorTypeDict);
    }

    /**
     * 新增传感器类型编码
     * 
     * @param sensorTypeDict 传感器类型编码
     * @return 结果
     */
    @Override
    public int insertSensorTypeDict(SensorTypeDict sensorTypeDict)
    {
        return sensorTypeDictMapper.insertSensorTypeDict(sensorTypeDict);
    }

    /**
     * 修改传感器类型编码
     * 
     * @param sensorTypeDict 传感器类型编码
     * @return 结果
     */
    @Override
    public int updateSensorTypeDict(SensorTypeDict sensorTypeDict)
    {
        return sensorTypeDictMapper.updateSensorTypeDict(sensorTypeDict);
    }

    /**
     * 批量删除传感器类型编码
     * 
     * @param sensorCodes 需要删除的传感器类型编码主键
     * @return 结果
     */
    @Override
    public int deleteSensorTypeDictBySensorCodes(String[] sensorCodes)
    {
        return sensorTypeDictMapper.deleteSensorTypeDictBySensorCodes(sensorCodes);
    }

    /**
     * 删除传感器类型编码信息
     * 
     * @param sensorCode 传感器类型编码主键
     * @return 结果
     */
    @Override
    public int deleteSensorTypeDictBySensorCode(String sensorCode)
    {
        return sensorTypeDictMapper.deleteSensorTypeDictBySensorCode(sensorCode);
    }

    @Override
    public SensorTypeDict selectSensorTypeDictByCode(String datum) {
        return sensorTypeDictMapper.selectSensorTypeDictByCode(datum);
    }
}
